package com.wang.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wang.domain.enums.DiagnosisCoatedEnum;
import com.wang.domain.enums.DiagnosisColorEnum;
import com.wang.domain.enums.DiagnosisCrackEnum;
import com.wang.domain.enums.DiagnosisIndentationEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author WangZai
 * @since 2023-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@TableName(value = "tongue_diagnosis")
public class TongueDiagnosis extends Model<TongueDiagnosis> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "tongue_diagnosis_id", type = IdType.AUTO)
    private Integer tongueDiagnosisId;

    private Integer tonguePicItemId;

    private Integer userId;

    private DiagnosisCoatedEnum coated;

    private DiagnosisColorEnum color;

    private DiagnosisCrackEnum crack;

    private DiagnosisIndentationEnum indentation;

    private String diagnosis;

    private String remark;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Boolean deleted;


    @Override
    protected Serializable pkVal() {
        return this.tongueDiagnosisId;
    }

}
